-- Store the string in a QuicKey (Command,Option,Shift T)
ask "Binding Cmd-Opt-Shift-T to:" with "hello world"
if it is empty then exit mouseUp
SetQuicText "CSO",17,it
-- This is a Command-Option-Space. It will bring up the QuicKeys‚Ñ¢
-- Quick Reference Card in order to show the changed text key.
PostEvent "CO",49
end mouseUp
-- part contents for background part 19
----- text -----
SetQuicText
-- part contents for card part 1
----- text -----
SetQuicText is used to alter the contents of a QuicKeys text key. It has the following parameters:
SetQuicText "modifiers", virtual-key, theText
The modifiers and virtual key parameters are explained in the PostEvent stack. Click on the PostEvent button for the details. theText is the text fragment that you wish the text key to represent.
One restriction - this routine doesn't create new text keys, it merely alters existing ones.
For a demo, create QuicKeys text key Cmd-Opt-Shift-T, and then click on the "T" button on the top right of this card. This will let you enter some text, apply it to the text key, and invoke the QuicKeys‚Ñ¢ Quick Reference Card to show that the change has taken effect.